package com.healthsystem.portplay.bean;

import java.time.LocalDate;

/*
 * 用户实体
 *
 * */
public class User {
    private int id;
    private String username;//用户名
    private String password;//密码
    private String email;//邮箱
    private String role;//角色
    private boolean state;//状态
    private String month; // 添加月份字段
    //会员开始时间
    private LocalDate startTime;//    如果你想以一天为单位来表示时间间隔，你可以使用 Java 中的 java.time.LocalDate 类来表示日期。
    //会员结束时间
    private LocalDate endTime;

    public User() {
    }

    public User(int id, String username, String password, String email, String role, boolean state) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.email = email;
        this.role = role;
        this.state = state;

    }

    public User(int id, String username, String password, String email, String role, boolean state, String month) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.email = email;
        this.role = role;
        this.state = state;
        this.month = month;
    }

    public User(int id, String username, String password, String email, String role, boolean state, String month, LocalDate startTime, LocalDate endTime) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.email = email;
        this.role = role;
        this.state = state;
        this.month = month;
        this.startTime = startTime;
        this.endTime = endTime;
    }

    /**
     * 获取
     *
     * @return id
     */
    public int getId() {
        return id;
    }

    /**
     * 设置
     *
     * @param id
     */
    public void setId(int id) {
        this.id = id;
    }

    /**
     * 获取
     *
     * @return username
     */
    public String getUsername() {
        return username;
    }

    /**
     * 设置
     *
     * @param username
     */
    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * 获取
     *
     * @return password
     */
    public String getPassword() {
        return password;
    }

    /**
     * 设置
     *
     * @param password
     */
    public void setPassword(String password) {
        this.password = password;
    }

    /**
     * 获取
     *
     * @return email
     */
    public String getEmail() {
        return email;
    }

    /**
     * 设置
     *
     * @param email
     */
    public void setEmail(String email) {
        this.email = email;
    }

    /**
     * 获取
     *
     * @return role
     */
    public String getRole() {
        return role;
    }

    /**
     * 设置
     *
     * @param role
     */
    public void setRole(String role) {
        this.role = role;
    }

    /**
     * 获取
     *
     * @return state
     */
    public boolean isState() {
        return state;
    }

    /**
     * 设置
     *
     * @param state
     */
    public void setState(boolean state) {
        this.state = state;
    }

    public String toString() {
        return "User{id = " + id + ", username = " + username + ", password = " + password + ", email = " + email + ", role = " + role + ", state = " + state + ",month=" + month + "}";
    }

    /**
     * 获取
     *
     * @return month
     */
    public String getMonth() {
        return month;
    }

    /**
     * 设置
     *
     * @param month
     */
    public void setMonth(String month) {
        this.month = month;
    }

    /**
     * 获取
     * @return startTime
     */
    public LocalDate getStartTime() {
        return startTime;
    }

    /**
     * 设置
     * @param startTime
     */
    public void setStartTime(LocalDate startTime) {
        this.startTime = startTime;
    }

    /**
     * 获取
     * @return endTime
     */
    public LocalDate getEndTime() {
        return endTime;
    }

    /**
     * 设置
     * @param endTime
     */
    public void setEndTime(LocalDate endTime) {
        this.endTime = endTime;
    }
}
